
pkgname=cmake
pkgver=3.11.4
pkgrel=1
pkgdesc="A cross-platform open-source make system"
arch=('x86_64')
license=('custom')
url="https://www.cmake.org"
depends=('curl' 'libarchive' 'shared-mime-info' 'libuv')
makedepends=('qt5-base')
source=("https://www.cmake.org/files/v3.11/${pkgname}-${pkgver}.tar.gz")
sha256sums=('8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5')

build() {
  cd ${pkgname}-${pkgver}

  ./bootstrap --prefix=/usr \
    --mandir=/share/man \
    --docdir=/share/doc/cmake \
    --system-libs \
    --qt-gui \
    --no-system-jsoncpp \
    --no-system-librhash \
    --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  install -Dm644 Copyright.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
